package com.lch.nacos;

import com.alibaba.nacos.api.config.annotation.NacosValue;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: liuchenhui
 * @create: 2020-02-16 20:23
 **/
@RestController
public class NacosController {

    @NacosValue(value = "${info:lch}", autoRefreshed = true)
    private String info;

    @GetMapping("/nacos")
    public Object getInfo() {
        return info;
    }
}
